package me.firstapp.spi.bbs;

import me.firstapp.common.json.PageObject;
import me.firstapp.common.json.SingleObject;
import me.firstapp.common.module.bbs.JsonCollection;

public interface CollectionService {

	/**
	 * 调用查询用户收藏数量接口
	 * 
	 * @param memberId
	 * @param topicId
	 * @param productId
	 * @return
	 */
	SingleObject<Long> findCollectionCounts(Long memberId, Long topicId, Long productId);

	/**
	 * 调用查询用户收藏数量接口
	 * 
	 * @param memberId
	 * @param topicId
	 * @param productId
	 * @param apiClientId
	 * @return
	 */
	SingleObject<Long> findCollectionCounts(Long memberId, Long topicId, Long productId, Long apiClientId);

	/**
	 * 调用查询用户是否收藏话题接口
	 * 
	 * @param memberId
	 * @param topicId
	 * @return
	 */
	SingleObject<JsonCollection> findMemberTopicCollectionRel(Long memberId, Long topicId);

	/**
	 * 调用查询用户是否收藏商品接口
	 * 
	 * @param memberId
	 * @param productId
	 * @return
	 */
	SingleObject<JsonCollection> findMemberProductCollectionRel(Long memberId, Long productId);

	/**
	 * 调用收藏、取消收藏接口
	 * 
	 * @param memberId
	 * @param topicId
	 * @param productId
	 * @param type
	 * @param isCollection
	 * @return
	 */
	SingleObject<Boolean> changCollectionStatus(Long memberId, Long topicId, Long productId, Integer type,
			Boolean isCollection);

	/**
	 * 调用分页查询用户收藏接口
	 * 
	 * @param pageNo
	 * @param pageSize
	 * @param memberId
	 * @param type
	 * @return
	 */
	PageObject<JsonCollection> findMemberCollections(Integer pageNo, Integer pageSize, Long memberId, Integer type);
}
